﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XLua;
public class Lesson1_LuaEnv : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        //Lua解析器
        //一般情况下 保持唯一性
        LuaEnv env = new LuaEnv();

        env.DoString("print('Hello World')");
        env.DoString("require('main')");
        
        //垃圾回收 帧更新中定时执行 或 切场景时执行
        env.Tick();
        
        //销毁
        env.Dispose();
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
